<?php
namespace demo;
/**
*
*/
date_default_timezone_set('PRC');

class HaiFeng{
	// var $xuesheng;
	protected $xuesheng='pengjing';
	private $xiaoSan='linzhiling';
	/**
	 * [__construct 构造方法，也叫初始化方法]
	 */
	public function __construct($xs){
		$this->xuesheng = $xs;
	}

	public function index(){
		echo "string";
	}

}
class Put extends HaiFeng{
	public $newName;

	public function __construct(){
		// parent::__construct();
		$this->newName = $this->xuesheng;
	}
	public function index(){
		parent::index();
		echo "<br/>";
		echo "Put";
	}
}

$haifeng = new HaiFeng();
$put = new Put();

// echo ($haifeng->xuesheng);
echo ($put->index());




?>
